package com.shi.yibanjia.controller;

import com.shi.yibanjia.common.Result;
import com.shi.yibanjia.service.CarryAndTransportFeeTableService;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/app/carryAndTransport")
public class CarryAndTransportFeeTableController {

    @Resource
    private CarryAndTransportFeeTableService carryAndTransportFeeTableService;

    @Cacheable(value = "yibanjia:carryAndTransport", key = "'carryAndTransportFeeTable'")
    @GetMapping
    public Result getCarryAndTransportFeeTable() {
        return Result.ok(carryAndTransportFeeTableService.getCarryAndTransportTable());
    }
}
